﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using DAL;
namespace BLL
{
    public class BLL_CMS_Category
    {
        DAL_CMS_Category DAL_CMS_Category = new DAL_CMS_Category();
        /// <summary>
        /// 查询所有栏目
        /// </summary>
        /// <returns></returns>
        public static List<CMS_Category> seleAll_CMS_Category()
        {
            return DAL.DAL_CMS_Category.seleAll_CMS_Category();
        }
        /// <summary>
        /// 新增栏目
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        public static int Insert(CMS_Category Category)
        {
            return DAL_CMS_Category.Insert(Category);
        }
        /// <summary>
        /// 修改栏目
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        public static int update_CMS_Category(int cid, string ctitle, string cname, bool nav, int navorder, bool search)
        {
            return DAL_CMS_Category.update_CMS_Category(cid,ctitle,cname,nav,navorder,search);
        }
        //删除栏目
        public static int Datete(int id)
        { 
              return DAL_CMS_Category.Datete(id);
        }
        //分页
        public static string GetPageCMS_Articles(int pageindex, int pagesize, string cid)
        {
            return DAL_CMS_Category.GetPageCMS_Articles(pageindex, pagesize, cid);
        }
        //单值查询
        public static List<CMS_Category> Selectid(int id)
        {
            return DAL_CMS_Category.Selectid(id);
        }
    }
}
